package autocode

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type ProgramInfoRouter struct {
}

// InitProgramInfoRouter 初始化 ProgramInfo 路由信息
func (s *ProgramInfoRouter) InitProgramInfoRouter(Router *gin.RouterGroup) {
	programInfoRouter := Router.Group("programInfo").Use(middleware.OperationRecord())
	programInfoRouterWithoutRecord := Router.Group("programInfo")
	var programInfoApi = v1.ApiGroupApp.AutoCodeApiGroup.ProgramInfoApi
	{
		programInfoRouter.POST("createProgramInfo", programInfoApi.CreateProgramInfo)   // 新建ProgramInfo
		programInfoRouter.DELETE("deleteProgramInfo", programInfoApi.DeleteProgramInfo) // 删除ProgramInfo
		programInfoRouter.DELETE("deleteProgramInfoByIds", programInfoApi.DeleteProgramInfoByIds) // 批量删除ProgramInfo
		programInfoRouter.PUT("updateProgramInfo", programInfoApi.UpdateProgramInfo)    // 更新ProgramInfo
	}
	{
		programInfoRouterWithoutRecord.GET("findProgramInfo", programInfoApi.FindProgramInfo)        // 根据ID获取ProgramInfo
		programInfoRouterWithoutRecord.GET("getProgramInfoList", programInfoApi.GetProgramInfoList)  // 获取ProgramInfo列表
	}
}
